package com.itany.cms.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_chapter")
public class Chapter {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer courseId;
    private String title;
    private String info;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDate;
    @TableField(exist = false)
    private LocalDateTime startCreateDate;
    @TableField(exist = false)
    private LocalDateTime endCreateDate;
    private Integer status;

    public Chapter(Integer courseId, String title, String info, LocalDateTime createDate, LocalDateTime startCreateDate, LocalDateTime endCreateDate, Integer status) {
        this.courseId = courseId;
        this.title = title;
        this.info = info;
        this.createDate = createDate;
        this.startCreateDate = startCreateDate;
        this.endCreateDate = endCreateDate;
        this.status = status;
    }
}
